package com.software;

import javax.servlet.jsp.tagext.SimpleTagSupport;
import java.io.IOException;

public class MyTag extends SimpleTagSupport {

    private String num;
    public void setNum(String num) {
        this.num = num;
    }

    @Override
    public void doTag() throws  IOException {

        if (num.length() == 10) {
            getJspContext().getOut().println("该标签归属于 " + "<"+num+">");
        } else {
            getJspContext().getOut().println("学号不正确");
        }
    }
}
